<style>
.weui_cell_bd {
    padding: 0;
	min-height:1.6rem;
	line-height:1.6rem;
}
.weui_cell_hd {min-width:3.7rem;padding: 0 4px;}
.weui_input {padding:0}
</style>
<style>
.fui-goods-item .image {
    height: 7rem;
    width: 10rem;
}
.fui-goods-group {
    padding:0.3rem
}
.radius .jy-group {border-radius:0.5rem;margin:0.35rem 0.5rem}
.radius .jy-group .fui-cell-group{border-radius:0.5rem;margin-top:0}
.bgfff .jy-group {background: #fff}
</style>
<div class='fui-page fui-page-current page-commission-register'>
	<img style="width:100%;position: relative" ng-src="{{tomedia(pagedata.pluginset.topbg) || '../addons/jy_shopworker/resource/images/topbg.jpg'}}" />
    <div class='fui-content'>
	<div class='jy-content' style="padding:0.5rem">
        <div class="weui_cells weui_cells_form" style='margin-top:0'>
            <div class='weui_cell'>
                <div class='weui_cell_hd'>选择商品</div>
                <div class='weui_cell_bd weui_cell_primary overflow'>
					<select class="weui_select" style="padding:0.3rem" name="cateid2" ng-model="pagedata.post.goodsid">
                        <option ng-repeat="q in pagedata.goods" value="{{q.id}}">{{q.title}}</option>
					</select>
				</div>
            </div>
            <div class='weui_cell'>
                <div class='weui_cell_hd'>成交价格</div>
                <div class='weui_cell_bd weui_cell_primary'><input type="text" class='weui_input' ng-model="pagedata.post.price" placeholder="请填写成交价格" /></div>
            </div>
            <div class='weui_cell'>
                <div class='weui_cell_hd'>备注</div>
                <div class='weui_cell_bd weui_cell_primary'><textarea class="weui_textarea" rows="2" style="background:#f9f9f9" ng-model="pagedata.post.remark" placeholder="请填写备注"></textarea></div>
            </div>
			<div class='weui_cell'>
                <div class='weui_cell_hd'>付款凭证</div>
                <div class='weui_cell_bd weui_cell_primary'>
				<div class="weui_uploader">
					<div class="weui_uploader_bd">
						<ul class="weui_uploader_files" ng-if="pagedata.post.payimg">
							<li class="weui_uploader_file" style="background-image:url({{tomedia(pagedata.post.payimg)}})"></li>
						</ul>
						<div class="weui_uploader_input_wrp" href="javascript:;" ng-click="up_file(pagedata.post,'payimg','image')"></div>
					</div>
				</div>
				</div>
            </div>
            <div class='weui_cell'>
                <div class='weui_cell_hd'>单号</div>
                <div class='weui_cell_bd weui_cell_primary'><input type="tel" class='weui_input' ng-model="pagedata.post.ordersn" placeholder="请填写单号,如果有的话" /></div>
            </div>
			<div class='weui_cell'>
                <div class='weui_cell_hd'>企业名称</div>
                <div class='weui_cell_bd weui_cell_primary'><input type="text" class='weui_input' ng-model="pagedata.post.cname" placeholder="请填写企业名称" /></div>
            </div>
			<div class='weui_cell'>
                <div class='weui_cell_hd'>联系人姓名</div>
                <div class='weui_cell_bd weui_cell_primary'><input type="text" class='weui_input' ng-model="pagedata.post.username" placeholder="请填写联系人姓名" /></div>
            </div>
			<div class='weui_cell'>
                <div class='weui_cell_hd'>联系人电话</div>
                <div class='weui_cell_bd weui_cell_primary'><input type="text" class='weui_input' ng-model="pagedata.post.mobile" placeholder="请填写联系人电话" /></div>
            </div>
			<div class='weui_cell'>
                <div class='weui_cell_hd'>付款时间</div>
                <div class='weui_cell_bd weui_cell_primary'><input type="date" class='weui_input' ng-model="pagedata.post.pay_time" ng-change="pagedata.uptime()" placeholder="请填写付款时间" /></div>
            </div>
		</div>
        <div class='btn btn-danger block btn-submit' style="margin-top:2rem" ng-click="post(pagedata.post,'/orderup/post/')">提交录入</div>
	</div>
	<div ng-include="sys_html('_footer')"></div>
	</div>
</div>
<script>
scope.pagedata.post.pay_time=new Date(scope.pagedata.post.pay_time);
scope.pagedata.uptime=function(){
	var date=scope.pagedata.post.pay_time
	var y = date.getFullYear();  
    var m = date.getMonth() + 1;  
    m = m < 10 ? '0' + m : m;  
    var d = date.getDate();  
    d = d < 10 ? ('0' + d) : d;  
    scope.pagedata.post.pay_time = y + '-' + m + '-' + d;  
}
</script>